package july2;

import java.util.ArrayList;
import java.util.Scanner;

public class Test01Search {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int[] arr={1,2,3,4,5,6,7,8,9,0,1,111,222,333,444,1};
        int temp=0;
        ArrayList<Integer> arrList = new ArrayList<>();
        for (int i = 0; i < arr.length; i++) {
            if (arr[i]==num) {
                temp++;
                arrList.add(i);
            }
        }
        System.out.print(num+"在数组中存在"+temp+"次,分别在[");
        for (int i = 0; i < arrList.size(); i++) {
            if (i==arrList.size()-1) {
                System.out.print(arrList.get(i));
            }else {
                System.out.print(arrList.get(i)+",");
            }

        }
        System.out.print("]的位置");
    }
}
